package bpm.dao.impl.document;

import java.sql.ResultSet;
import java.sql.SQLException;

import org.springframework.jdbc.core.RowMapper;

import bpm.domain.document.DocumentEntry;
/**
 * 
 * @author ZhaoWangLong Jul 25, 2011
 *
 */
public class DocumentEntryRowMapper implements RowMapper {

	public Object mapRow(ResultSet rs, int i) throws SQLException {
		DocumentEntry docEntry=new DocumentEntry();
		docEntry.setId(rs.getString("ID"));
		docEntry.setDocumentId(rs.getString("DOC_ID"));
		docEntry.setFieldKey(rs.getString("FIELD_KEY"));
		docEntry.setValue(rs.getString("VALUE"));
		docEntry.setCreateTime(rs.getDate("CREATE_TIME"));
		docEntry.setLastUpdateTime(rs.getDate("LAST_UPDATE_TIME"));
		docEntry.setDescription(rs.getString("DESCRIPTION"));
		return docEntry;
	}

}
